This page last changed on Apr 02, 2008.
edocs Home > BEA AquaLogic Data Services Platform 3.0/3.2 Documentation > ALDSP 3.2 New Features Documentation Support for Derived Simple TypesThis topic describes the support for derived simple types in AquaLogic Data Services Platform (ALDSP) 3.2. IntroductionALDSP 3.2 enables you to employ user-derived simple types as parameters or return types in data service operations accessed through the ALDSP Mediator API.
This enables you to create a simple type in a schema which restricts a built-in schema type, and use that type as either a parameter type or a return type for a data service operation, successfully invoking the operation through the ALDSP Mediator API. For example, you might declare a simple type called ZipCode that derives from xsd:string, as shown in the following: <xs:simpleType name="ZipCode"> <xs:restriction base="xs:string"> <xs:pattern value="[0-9]{5}(-[0-9]{4})?"/> </xs:restriction> </xs:simpleType> ALDSP 3.2 enables you to use this type as a parameter type or return type for a data service operation. Mapping Derived Schema Types to Java TypesThe mapping of derived schema types to Java types is defined by the SDO specification and, with one exception, is identical to the mapping of the corresponding built-in schema types. For example, if a user type is derived from xs:string, the Java class is java.lang.String. Similarly, if a user type is derived from xs:byte, the Java class is java.lang.Byte.
The single exception involves using XSD types that are derived from xs:integer and include facets (such as minInclusive, maxInclusive, minExclusive, maxExclusive, or enumeration) constraining the range to be within the range of the Java data type int. ALDSP 3.2 maps these XSD types to the Java type java.lang.Integer instead of the default type java.math.BigInteger. Note that this is also true for user XSD types that derive from the following schema built-in types (which are themselves derived from xs:integer):
See AlsoReference |
Document generated by Confluence on Apr 28, 2008 16:19 |